import * as actionType from "./content";
const initState = {
  currentPage: 0,
  pageList: [],
  totalCount: 0,

  isLoading: false,
};
function reducer(state = initState, action) {
  switch (action.type) {
    case actionType.CHANGE_CURRENTPAGE:
      return { ...state, currentPage: action.currentPage };
    case actionType.CHANGE_PAGELIST:
      return { ...state, pageList: action.pageList };
    case actionType.CHANGE_TOTALCOUNT:
      return { ...state, totalCount: action.totalCount };
    case actionType.CHANGE_ISLOADING:
      return { ...state, isLoading: action.isLoading };
    default:
      return state;
  }
}
export default reducer;
